home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tiger Disk 67
/
Tiger_Disk_067_19xx_Tiger-Crew-Disk_de_Side_B.d64
/
loes quad gleich
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2023-02-26
|
1KB
|
49 lines
1 poke53280,1:poke53281,1:printchr$(147);chr$(142);
2 print"[146][144] ####################
3 [153]" # #
4 print" # mathematik 010 #
5 [153]" # #
6 print" # dieses programm #
7 [153]" # loesst eine #
8 print" # quadratische #
9 [153]" # gleichung mit #
10 print" # gegebenem a,b,c. #
11 [153]" # #
12 print" # #
13 [153]" # es werden sowohl #
14 print" # reale als auch #
15 [153]" # komplexe loe- #
16 print" # sungen angegeben #
17 [153]" # #
18 print" # #
19 [153]" # #
20 print" # public domain #
21 [153]" # #
22 print" ####################
23 [146] 198,1:[151]198,0
24 [153]"load"
25 [153]"geben sie die werte fuer a, b und c ein:
26 inputa,b,c
27 d=((b^2)-(4*a*c))/(4*a^2)
28 ifd>=0then35
29 x=-b/(2*a)
30 y=(sqr((4*a*c)-(b^2)))/(2*a)
31 print"komplexe loesung :
32 [153]"realteil =";x
33 [153]"imaginaerteil=";y
34 [137]44
35 e[178][171]b[173](2[172]a)
36 [139]e[177][178]0[167]39
37 z[178]e[171][186](d)
38 [137]40
39 z[178]e[170][186](d)
40 w[178]c[173](z[172]a)
41 [153]"reelle loesungen :
42 print"x 1 =";z
43 print"x 2 =";w
44 print"[164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164]":print
45 print"zur fortsetzung space druecken, ende bei eingabe einer 0
46 [161]a$:[139]a$[179][177]"0"[175]a$[179][177]" "[167]46
47 [139]a$[178]" "[167]24
48 [128]